{%include file="header.html"%}
<form action="/acl/delete" method="POST" {%if $is_validator%} id="adminform" onsubmit="return Validator.Validate(this)" {%/if%}>
<table width="100%" cellspacing="0" border="0" class="adminlist">
	<thead>
    	<tr>
        	<th><input id="toggle" type="checkbox" value="" /></th>
        	<th>{%$systemLang.moduleName%}</th>
        	<th>{%$systemLang.moduleMark%}</th>
        	<th>{%$systemLang.subWay%}</th>
        	<th>{%$systemLang.operate%}</th>
        </tr>
    </thead>
    <tbody>
    	{%foreach from=$aclTree item="tmp" key="a"%}
        <tr class="row0" title='{%$tmp.acl_desc%}'>
        	<td><input name="select_id[]" type="checkbox" class="checkbox" id="cb{%$a++%}" value="{%$tmp.acl_id%}"/></td>
            <td>&nbsp;{%$tmp.acl_name%}</td>
        	<td>&nbsp;{%$tmp.acl_value%}</td>
        	<td>&nbsp;{%$tmp.acl_children%}</td>
        	<td>
             <a href="{%$smarty.const.BASEURI%}acl/edit/{%$tmp.acl_id%}">{%$systemLang.edit%}</a>&nbsp;
             <a href="{%$smarty.const.BASEURI%}acl/delete/{%$tmp.acl_id%}" onclick="return confirm('{%$systemLang.confirmDel%}')" "{%$smarty.const.IS_DELETE%}>{%$systemLang.del%}</a>
            </td>
        </tr>
      {%/foreach%}
    </tbody>
	<tr>
       	<td colspan="6"><input type="button" class="button" name="subsmit" value="{%$systemLang.del%}" onclick="select_control('{%$smarty.const.BASEURI%}acl/delete','{%$systemLang.confirmDel%}')" /></td>
    </tr>
</table>
</form>
<form action="/acl/add" method="POST"  onsubmit="return Validator.Validate(this)">
<table width="100%" cellspacing="0" border="0" class="adminlist">
	<thead>
    	<tr>
            <th>{%$systemLang.parentResouces%}</th>
        	<th>{%$systemLang.resourcesName%}</th>
        	<th>{%$systemLang.resoucesMark%}</th>
            <th>{%$systemLang.subMethod%}</th>
        	<th>{%$systemLang.resoucesDesc%}</th>
        	<th>{%$systemLang.operate%}</th>
        </tr>
    </thead>
    <tbody>
    	
    	<tr>
            <td>
            	<select name="acl[top_id]">
                	<option value="0">{%$systemLang.module%}</option>
                    {%foreach from=$aclTree item="tmp"%}
                    <option value="{%$tmp.acl_id%}">{%$tmp.acl_name%}
                    {%/foreach%}
                </select>
            </td>
        	<td><input type="text" name="acl[acl_name]" class="text" style="width:100px;" value="" dataType='Require' msg='{%$systemLang.resouceNameNotEmpty%}' /></td>
        	<td><input type="text" name="acl[acl_value]" class="text" style="width:100px;"  value=""  dataType='Custom' regexp='[a-z_]+' msg='{%$systemLang.resouceNameNotEmtpyEn%}'/></td>
            <td><input type="text" name="acl[acl_children]" class="text" value=""  />
        	<td><input type="text" name="acl[acl_desc]" class="text" value="" /></td>
        	<td><input type="submit" class="button" name="ng" value="{%$systemLang.submit%}" /></td>
        </tr>
    </tbody>
    <tfoot>
    </tfoot>
</table>
</form>